#include <bits/stdc++.h>
using namespace std;
long long n;
int main()
{
    freopen("duel.in","r",stdin);
    freopen("duel.out","w",stdout);
    cin>>n;
    long long ab[n+5],ac[n+5]={0};
    for(int i=0;i<n;i++)
    {
        cin>>ab[i];
    }
    long long sum=n;
    sort(ab,ab+n);
    //for(int i=0;i<n;i++)
    //{
    //    cout<<ab[i]<<" ";
    //}
    //cout<<"\n";
    for(int j=0;j<n;j++)
    {
        int k=0;
        if(ab[j]==-1) continue;
        for(int l=j;;l++)
        {
            if(ab[l]==-1||ab[l]==ab[j]||ac[l]==-1) k++;
            else break;
        }
        if(k==0) k=1;
        if(k>=n-j) break;
        if(ab[j+k]>ab[j])
        {
            ab[j]=-1;
            ac[j+k]=-1;
            sum--;
        }
        //cout<<k<<" ";
    }
    //cout<<endl;
    cout<<sum;
    return 0;
}
